package com.nightsoul.groovy



/**
 * @author zj
 *
 */
public class BooleanTest{

	public static void main(def args){
		//boolean value are trivial
		assert true;
		assert !false;
		
		// Matchers must match
		assert ('a' =~ /./);
		assert !('a' =~ /b/);
		
		//collections must be non-empty
		assert [1];
		assert ![];
		
		//maps must be non-empty
		assert ['a':1];
		assert ![:];
		
		// numbers(any type) must be nonzero
		assert 1;
		assert 1.1;
		assert 1.2f;
		assert 1.3g;
		assert 2L;
		assert 3G;
		assert !0;
		
		//any other value must be non-null
		assert new Object();
		assert !null;
	}
	
}
